<form class="form-horizontal form-validate form-modal" method="post" action="{:url('info')}">
  <div class="modal-dialog" style="width: 700px;">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">{$row['id']>0?'编辑礼物':'添加礼物'}</h4>
      </div>
      <div class="modal-body">

        <div class="form-group">
          <label class="control-label">礼物名称：</label>
          <div class="col-sm-6">
            <input type="text" class="input-xlarge"  data-rule-required="true" data-rule-maxlength="5" name="gift_name" value="{$row.gift_name}" >
          </div>
        </div>
        <div class="form-group">
          <label class="control-label">礼物价值：</label>
          <div class="col-sm-6">
            <input type="text" class="input-xlarge"  data-rule-required="true" placeholder="请输入0-999的数字" data-rule-number="true" data-max="999" name="gift_price" value="{$row.gift_price}" >元
          </div>
        </div>
        <div class="form-group">
          <label class="control-label">礼物图标：</label>
          <div class="controls col-sm-6">
            <div class="defUpImgBox" data-toggle="uploaderOne">
              <img id="img_logo" src="{$row.gift_img|default='__STATIC__/main/img/image.png'}">
              <input id="input_logo" type="hidden"  name="gift_img" data-rule-required="true"  value="{$row.gift_img}">
              <div class="tips">点击上传</div>
            </div>
          </div>
        </div>

      </div>
      <div class="modal-footer">
        <input  type="hidden" name="id" value="{$row.id|intval}"/>
        <button type="submit" class="btn btn-primary" data-loading-text="保存中..." disabled>保存</button>
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
      </div>
    </div>
  </div>
</form>
<script>
  function nums_nums(type) {
    if (type==2) {
      $("input[name='task_nums']").show();
    } else {
      $("input[name='task_nums']").hide();
    }
  }
</script>